@import url('./assets/fonts-inter.css');

.bnEditor {
  outline: none;
  /* padding-inline: 54px; */

  /* Define a set of colors to be used throughout the app for consistency
  see https://atlassian.design/foundations/color for more info */
  --N800: #172b4d; /* Dark neutral used for tooltips and text on light background */
  --N40: #dfe1e6; /* Light neutral used for subtle borders and text on dark background */
}

/*
bnRoot should be applied to all top-level elements

This includes the Prosemirror editor, but also <div> element such as 
Tippy popups that are appended to document.body directly
*/
.bnRoot {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.bnRoot *,
.bnRoot *::before,
.bnRoot *::after {
  -webkit-box-sizing: inherit;
  -moz-box-sizing: inherit;
  box-sizing: inherit;
}

/* reset styles, they will be set on blockContent */
.defaultStyles p,
.defaultStyles h1,
.defaultStyles h2,
.defaultStyles h3,
.defaultStyles li {
  all: unset !important;
  margin: 0;
  padding: 0;
  font-size: inherit;
  /* min width to make sure cursor is always visible */
  min-width: 2px !important;
}

.defaultStyles {
  font-size: 18px;
  font-weight: normal;
  font-family: Georgia, 'Times New Roman', Times, serif !important;
  font-size: 1.2em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dragPreview {
  position: absolute;
  top: -1000px;
}

/* Give a remote user a caret */
.collaboration-cursor__caret {
  border-left: 1px solid #0d0d0d;
  border-right: 1px solid #0d0d0d;
  margin-left: -1px;
  margin-right: -1px;
  pointer-events: none;
  position: relative;
  word-break: normal;
}

/* Render the username above the caret */
.collaboration-cursor__label {
  border-radius: 3px 3px 3px 0;
  color: #0d0d0d;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  left: -1px;
  line-height: normal;
  padding: 0.1rem 0.3rem;
  position: absolute;
  top: -1.4em;
  user-select: none;
  white-space: nowrap;
}

.ProseMirror.virtual-cursor-enabled {
  /* Hide the native cursor */
  caret-color: transparent;
}

.ProseMirror-focused {
  /* Color of the virtual cursor */
  --prosemirror-virtual-cursor-color: #406b84;
}

.ProseMirror .prosemirror-virtual-cursor {
  position: absolute;
  cursor: text;
  pointer-events: none;
  transform: translate(-1px);
  user-select: none;
  -webkit-user-select: none;
  border-left: 2px solid var(--prosemirror-virtual-cursor-color);
}

.ProseMirror .prosemirror-virtual-cursor-left {
  width: 1ch;
  transform: translate(calc(-1ch + -1px));
  border-bottom: 2px solid var(--prosemirror-virtual-cursor-color);
  border-right: 2px solid var(--prosemirror-virtual-cursor-color);
  border-left: none;
}

.ProseMirror .prosemirror-virtual-cursor-right {
  width: 1ch;
  border-bottom: 2px solid var(--prosemirror-virtual-cursor-color);
  border-left: 2px solid var(--prosemirror-virtual-cursor-color);
  border-right: none;
}

.ProseMirror-focused .prosemirror-virtual-cursor-animation {
  animation: prosemirror-virtual-cursor-blink 1s linear infinite;
  animation-delay: 0.5s;
}

@keyframes prosemirror-virtual-cursor-blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
